<?php
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license GNU Affero General Public License
 * @link https://blueimp.net/ajax/
 */

require_once($_SERVER["DOCUMENT_ROOT"]."/modules/base_mod.php");
// List containing the custom channels:
$channels = array();

$conn = BaseMod::getConnection();
$sql = "select id, name from ajax_chat_channels order by id";
$result = mysql_query($sql, $conn);

while($row = mysql_fetch_assoc($result)){
    $id = $row["id"];
    $name = $row["name"];
    $channels[$id] = $name;
}
// Sample channel list:
//$channels[0] = 'Web Tavern';
//$channels[1] = 'PFC Room';
?>